<!DOCTYPE html>
<HTML>
<HEAD><meta name="viewport" content="width=device-width, initial-scale=1">
<Title>ColorAxis.setColorScale</Title>
<link type='text/css' rel='Stylesheet' href="maxchartapi.css" />
</HEAD>
<body bgcolor="#FFFFFF" text="#000000" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0">

<p class="heading0">ChartDirector 7.0 (Java Edition)</p>
<p class="heading1"><a href="ColorAxis.htm">ColorAxis</a>.<wbr>setColorScale</p>
<hr class="separator">
<p class="heading2a">Usage</p>
<div class="content">
public void setColorScale(double[] colorStops [, int underflowColor [, int overflowColor ]])
</div>
<p class="heading2">Description</p>
<div class="content">
Sets the axis scale and the associated colors.<br><br>
The axis scale and the associated colors are defined with an array of numbers. For a color scale with continuous color gradient, each pair of numbers represents a value and its associated color. For example, for a continuous color scale in which 0 is blue (0000FF), 50 is yellow (FFFF00) and 100 is red (FF0000), the numbers should be:<br><br>
<div class="indentedblock"><code>0.0, 0x0000ff, 50.0, 0xffff00, 100.0, 0xff0000</code></div><br>
For a color scale with discrete color steps, the number of colors would be one less than the number of values. For example, to define a step color scale in which 0 to 50 is red (FF0000), and 50 to 100 is green (00FF00), the numbers will be:<br><br>
<div class="indentedblock"><code>0.0, 0xff0000, 50.0, 0x00ff00, 100.0</code></div>
</div>
<p class="heading2">Arguments</p>
<div class="content">
<div style="width:100%;box-sizing:border-box;">
<table border="1" cellpadding="5" cellspacing="0" width="100%"> 
<tr>
<th width="19%">Argument</th><th width="19%">Default</th><th>Description</th>
</tr>
<tr>
<td>colorStops</td><td>(Mandatory)</td><td>An array of numbers alternating between values and colors. If the number count is even, the array will define a continuous color scale, otherwise it will define a step color scale.</td></tr><tr><td>underflowColor</td><td>-1</td><td>The color to use if a value falls below the minimum value of the axis scale. -1 means the underflowColor is the same color at the minimum value.</td></tr><tr><td>overflowColor</td><td>-1</td><td>The color to use if a value exceeds the maximum value of the axis scale. -1 means the overflowColor is the same color at the maximum value.</td>
</tr>
</table>
</div>
</div>
<p class="heading2">Return Value</p>
<div class="content">
None
</div>
<br><hr class="separator">
<div class="copyright">&copy; 2022 Advanced Software Engineering Limited. All rights reserved.</div>
</body>
</HTML>
